[pytest]
testpaths = tests/ scripts/tests/
python_classes = Test* *Test
log_format = %(asctime)s - %(levelname)s - %(name)s - %(message)s
log_level = DEBUG
markers =
    java
    gpu: marks tests that need at least one GPU
filterwarnings =
# Note: When a warning matches more than one option in the list,
# the action for the _last_ matching option is performed.
#
# individual warnings filters are specified as a sequence of fields separated by colons:
# action:message:category:module:line
# <reference: https://docs.python.org/3/library/warnings.html#warning-filter>
#
# how to explicitly test warns
#  using `unittest`: https://docs.python.org/3/library/warnings.html#testing-warnings
#  using `pytest`: https://docs.pytest.org/en/4.1.0/warnings.html#assertwarnings
#
# Our policy here is to ignore (silence) any deprecation warnings from _outside_ allennlp, but to
# treat any _internal_ deprecation warnings as errors.  If we get a deprecation warning from things
# we call in another library, we will just rely on seeing those outside of tests.  The purpose of
# having these errors here is to make sure that we do not deprecate things lightly in allennlp.
    ignore::DeprecationWarning
    ignore::PendingDeprecationWarning
    error::DeprecationWarning:allennlp.*:
    error::PendingDeprecationWarning:allennlp.*:
# For these particular warnings, we don't want to cause an error for it, but we also don't want to
# see it a whole bunch of times.
    once:This particular transformer implementation is a provisional feature.*::allennlp\.modules\.seq2seq_encoders\.bidirectional_language_model_transformer
	ignore:Length of IterableDataset.*:UserWarning:torch\.utils\.data\.dataloader
	ignore::UserWarning:allennlp.*:
